﻿@model zhangmenren.Models.RealEntity
@{
    Layout = "_Layout";
}
<body class="layui-anim layui-anim-up">

    <form class="layui-form">

        <div class="layui-form-item">
            <input type="hidden" name="id" value="@Model.Id" />
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <select name="state" lay-verify="required">
                    <option value="">请选择</option>
                    <option value="0">待审核</option>
                    <option value="1">审核通过</option>
                    <option value="2">审核不通过</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input type="text" disabled value="@Model.Name" autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">身份证号</label>
            <div class="layui-input-block">
                <input type="text" disabled value="@Model.CarNO" placeholder="请输入链接地址" class="layui-input">
            </div>
        </div>
        <div class="layui-upload">
            <label class="layui-form-label">图片1</label>
            <div class="layui-input-block">
                <img class="layui-upload-img" src="@Model.CarImgZ" id="demo1" style="width:300px;height:150px;margin:10px 0;">
            </div>
        </div>
        <div class="layui-upload">
            <label class="layui-form-label">图片2</label>
            <div class="layui-input-block">
                <img class="layui-upload-img" src="@Model.CarImgF" id="demo1" style="width:300px;height:150px;margin:10px 0;">
            </div>
        </div>
        <div class="layui-upload">
            <label class="layui-form-label">图片3</label>
            <div class="layui-input-block">
                <img class="layui-upload-img" src="@Model.PhotoZ" id="demo1" style="width:300px;height:150px;margin:10px 0;">
            </div>
        </div>
        <div class="layui-upload">
            <label class="layui-form-label">图片4</label>
            <div class="layui-input-block">
                <img class="layui-upload-img" src="@Model.PhotoF" id="demo1" style="width:300px;height:150px;margin:10px 0;">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">提交审核日期</label>
            <div class="layui-input-block">
                <input type="text" disabled placeholder="" value="@string.Format("{0:yyyy-MM-dd HH:mm}",Model.AddDT)" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item" align="center">
            <button class="layui-btn layui-btn-normal btnEdit" lay-submit="" lay-filter="btnEdit" style="display:none;">操作</button>
        </div>
    </form>

    <script>
        layui.use(['form','layer','upload'], function(){
        $=layui.jquery;
          var form = layui.form
          ,layer = layui.layer;
                  //监听提交
			form.on('submit(btnEdit)', function(data){

                var obj = data.field;

                console.log(obj);

                HsCms.AjaxJson("/Admin/User/UpState", "post", obj, function (result) {
				  if (result.state === "ok") {
					  HsCms.CloseFrame();
					  HsCms.ParentLoad("user");
				  }
				  HsCms.ParentMsg(result.msg);
			  });
            return false;
          });



       });
    </script>

</body>